[PATCH] QtQml: Do not clear objects' propertyCaches on last GC run
The property caches are not specific to the engine. The same object may
be exposed to other engines and still require its property cache. When
the clearing of the property caches on engine destruction was
introduced, the property caches were still engine-specific and we had no
choice but to clear them. Otherwise any further access would lead to a
dereference of a dangling pointer.
Furthermore, when clearing the JS wrapper for a QObject, check if it's
actually the wrapper being deleted. We don't want to clear some other
engine's wrapper.
Amends commit
749a7212e903d8e8c6f256edb1836b9449cc7fe1.
Amends commit
c6b2dd879d02b21b18f80faab541f8f04286685a.
Fixes: QTBUG-142514
Change-Id: I40bb1aeca65225d56cb1d2ff498f5f1722216a70
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit
dc2358e98b8ddab532866a403ffc09d1162ad0f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit
abd054a491b5f443193033d451dc17e09841277a)
Gbp-Pq: Name upstream_qtqml_crash_fix.diff